<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/15 0015
 * Time: 下午 5:05
 */
namespace app\common\lib;
use app\common\Helper;

/**
 * 地图相关
 * Class Map
 * @package app\common\lib
 */
class Map{
    /**
     * 根据经纬度解析出详细地址
     */
    public static function geocoder($latandlng){
        $url = sprintf(config('map.geocoder_url'),$latandlng,config('map.Tencent_MapKey'));
        $result = json_decode(Helper::curlGet($url),true);
        return $result['result']['address_component'];
    }
}